package com.atguigu.guliguli.common.utils;

import lombok.Getter;
import lombok.Setter;

/**
 * 自定义异常
 *
 * @author: yezi
 * @date: 2021/11/27 09:33
 **/
@Getter
@Setter
public class RRException extends RuntimeException {
    private static final long serialVersionUID = 744727935699735249L;
    private String msg;
    private int code = 500;

    public RRException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public RRException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public RRException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public RRException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }

}